#pragma once

#include <QObject>
#include "ExType.h"
#include "ExMacro.h"

class ExD3DWidget;
class ExCamera;
class ExGameObject;
class ExD3DThread;
class ExGameTimer;
class QWidget;

class ExLevel : public QObject
{
	Q_OBJECT

public:
	ExLevel(QWidget *parent, QRect LevelRect);
	~ExLevel();

	void CalculateFrameStats(); // 计算每秒帧数

	void DrawScene();

	void OnResize(QRect LevelRect);

public Q_SLOTS:

	void RenderRun();

protected:

	ExD3DWidget* D3DWidget;

	ExD3DThread* D3DThread;

	ExGameTimer* GameTimer;

	ExCamera* Camera;

	int FrameCount;

	float TimeElapsed;
};
